package com.qfedu.fmmall.item.controller;

import com.qfedu.fmmall.item.service.OrderItemAddService;
import com.qfedu.fmmall.vo.ShoppingCartVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author : yanBin
 * @date :2022/1/25 14:55
 */
@RestController
@RequestMapping("/item")
public class OrderItemAddController {

    @Autowired
    private OrderItemAddService orderItemAddService;

    @PostMapping("/save")
    public int addItem(@RequestBody List<ShoppingCartVO> shoppingCartVOList,
                       @RequestParam("orderId") String orderId){

        System.out.println("-------------------------order-item-add服务");
        return orderItemAddService.addItem(shoppingCartVOList,orderId);

    }
}
